home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
501 Great Games
/
501 Great Games - Volume One (2001)(Guildhall Leisure Services).iso
/
EASIQS_5
/
SAMPLE06.SDY
< prev
Wrap
Text File
|
1996-03-09
|
3KB
|
106 lines
"EASI QS v5"
"Computer Organization Chpt 3 - MIPS assembly language"
"MS Sans Serif"
"MS Sans Serif"
9.75
"name 2 key points about arithmetic instructions on MIPS "
9.75
" 1. always have 3 OPERANDS
2. arithmetic operations occur ONLY ON REGISTERS"
9.75
"Name the 4 underlying principles of hardware design "
9.75
" 1. Simplicity favours regularity.
2. Smaller is faster.
3. Good design demands compromise.
4. Make the common case fast.
"
9.75
"Define 'spilling' registers "
9.75
" The process of putting less commonly used variables
( or those needed later ) into memory.
ie. saving regs as procs call procs that call procs etc."
9.75
"Why use registers ? "
9.75
" 1. Faster.
2. Easier to use.
(arith instr can read 2 regs, operate on them, write result.
data xfer instr reads or writes only 1 operand,
without operating on it) "
9.75
"What are the 2 principles of the 'stored-program' computer ? "
9.75
" 1. the use of instructions that are indistinguishable from numbers.
2. the use of alterable memory for programs. "
9.75
"Define assembly language "
9.75
"A symbolic representation of instructions "
9.75
"What are pseudoinstructions ? "
9.75
"
common variations of machine language instructions
that are not part of the machine architechture,
but which the assembler accepts
and converts into the machine language equivalent."
9.75
"What's the difference between a computer and a simple calculator ? "
9.75
" The ability to make decisions. (Programmability)"
9.75
"Describe the 'at' register "
9.75
"
Reg $1 (at) is reserved for the assembler
to use as a temp reg while working on pseudoinstructions
so as not to corrupt regs used by the program."
9.75
"What is 'lui' ? "
9.75
" Load Upper Immed
- sets the upper 16 bits of a 32-bit const in a reg
- fills lower 16 with 0's
( a subsequent 'addi' sets the lower 16 bits )
Note: breaking up large constants is another time the
assembler makes use of 'at', in addition to expanding
the set of 'branch' instructions accepted."
9.75
"What are the MIPS addressing modes ? "
9.75
" 1. Register - operand is a reg
2. Base or Displacement - operand is at mem loc whose
addr = addr_field + reg
3. Immediate - operand is constant within the instruction
4. PC-relative - address = PC + constant_in_instruction"
9.75
"3 General steps in translating 'C' to 'asm'..."
9.75
" 1. Allocate regs to program variables
2. Code the body of the proc
3. Preserve regs across proc call "
9.75
"Describe 'twos complement' representation"
9.75
"1. MSB is 0 for all positive numbers, 1 for negative
2. Only 1 zero
3. 1000 0000 ... is the most negative number ( -2 e (bits-1) )
ie for a 32-bit 1000 0000 0000 0000 = -2e31
4. To read a negative:
(b31 * -2e31) + (b30 * 2e30) + (b29 * 2e29) + ...
^
Note: ^ ( all others positive )"
9.75
"2 shortcuts for two's complement numbers "
9.75
"1. to negate a binary number:
invert every bit, then add 1 to the result
2. to convert a binary number of n bits to a bigger representation
'sign extension' - copy number to larger field, then
replicate MSB to all bits left of it. "